import Vue from 'vue'
import Router from 'vue-router'

import tabbar from '@/components/tabbar'
Vue.use(Router)
export default new Router({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/home',
      name: 'home',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/home'),
        tabbar: tabbar
      }
    },
    {
      path: '/points',
      name: 'points',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/points'),
        tabbar: tabbar
      }
    },
    {
      path: '/user',
      name: 'user',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/user'),
        tabbar: tabbar
      }
    },
    {
      path: '/capital',
      name: 'capital',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/capital'),
        tabbar: tabbar
      }
    },
    {
      path: '/assets',
      name: 'assets',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/user/assets'),
      }
    },
    {
      path: '/register',
      name: 'register',
      components: {
        default: () => import('@/views/register'),
      }
    },
    {
      path: '/',
      name: 'login',
      components: {
        default: () => import('@/views/login'),
      }
    },
    {
      path: '/myset',
      name: 'myset',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/user/myset'),
      }
    },
    {
      path: '/myinfo',
      name: 'myinfo',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/user/myinfo'),
      }
    },
    {
      path: '/myteam',
      name: 'myteam',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/user/myteam'),
      }
    },
    {
      path: '/team',
      name: 'team',
      components: {
        default: () => import('@/views/user/team'),
      }
    },
    {
      path: '/mywallet',
      name: 'mywallet',
      components: {
        default: () => import('@/views/user/mywallet'),
      }
    },
    {
      path: '/market',
      name: 'market',
      components: {
        default: () => import('@/views/user/market'),
      }
    },
    {
      path: '/recommend',
      name: 'recommend',
      components: {
        default: () => import('@/views/user/recommend'),
      }
    },
    {
      path: '/buy',
      name: 'buy',
      components: {
        default: () => import('@/views/buy/buy'),
      }
    },
    {
      path: '/serve',
      name: 'serve',
      components: {
        default: () => import('@/views/user/serve'),
      }
    },
    {
      path: '/withdraw',
      name: 'withdraw',
      components: {
        default: () => import('@/views/buy/withdraw'),
      }
    },
    {
      path: '/help',
      name: 'help',
      components: {
        default: () => import('@/views/user/help'),
      }
    },
    {
      path: '/forget',
      name: 'forget',
      components: {
        default: () => import('@/views/forget'),
      }
    },
    {
      path: '/p_buy',
      name: 'p_buy',
      components: {
        default: () => import('@/views/buy/p_buy'),
      }
    },
    {
      path: '/mysell',
      name: 'mysell',
      components: {
        default: () => import('@/views/sell/mysell'),
      }
    },
    {
      path: '/jointeam',
      name: 'jointeam',
      components: {
        default: () => import('@/views/user/jointeam'),
      }
    },
    {
      path: '/recharge',
      name: 'recharge',
      components: {
        default: () => import('@/views/money/recharge'),
      }
    },
    {
      path: '/cash',
      name: 'cash',
      components: {
        default: () => import('@/views/money/cash'),
      }
    },
    
  ]
})


